package com.meowcook.pojo.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * Created with Intellij IDEA.
 * Description:
 * User: 28792
 * Date: 2025-05-17
 * Time: 16:26
 */
@Data
@ApiModel(value = "评论信息")
public class CommentDTO {
    @NotNull
    @ApiModelProperty(value = "菜谱id", required = true)
    private Long recipeId;

    @JsonIgnore
    private Long userId;

    @NotBlank
    @Length(max = 300, min = 1,  message = "评论内容长度不能超过300个字符,不能小于1个字符")
    @NotNull
    @ApiModelProperty(value = "评论内容, 超过300个字符", required = true)
    private String content;
}
